#ifndef TPLATE
#define TPLATE
#include "ti.h"
#include <vector>
using namespace std;

typedef struct {
    int tpsize;
    int *pos;
} tplate;

typedef struct {
    int dvsize;
    int *tpos;
    int *pos;
    int **value;
} data_event;

void load_template(tplate * tp, char *fn);
void get_dv(data_event * dv, tplate * tp, target_grid * target, int g,
            int x, int y, int max_dv = 10);

#endif                            /* ifndef TPLATE */
